package org.bcncoding.appengine.droiding.server.entity;

import java.util.Date;
import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NullValue;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Station {
	
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id = null;
	
	@Persistent
	private String key = null;
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	private ServiceProvider provider = null;
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	private String location = null;
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	private Double latitude = null;
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	private Double longitude = null;	
	
	@Persistent
	private List<StationData> data = null;
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	private Date lastUpdate = null;
	
	public Key getId() {
		return id;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public ServiceProvider getProvider() {
		return provider;
	}

	public void setProvider(ServiceProvider provider) {
		this.provider = provider;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public Date getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	public List<StationData> getData() {
		return data;
	}

	public void setData(List<StationData> data) {
		this.data = data;
	}
}
